package cn.stylefeng.guns.modular.membership.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author allen
 * @date 2021/4/12 14:19
 * @version 1.0
 */

/**
 * 会员等级变更的明细表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "membership_member_level_detail")
public class MembershipMemberLevelDetailEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户账号id
     */
    @TableField(value = "user_account_id")
    private Long userAccountId;

    /**
     * 本次变动之前的成长值
     */
    @TableField(value = "old_growth_value")
    private Long oldGrowthValue;

    /**
     * 本次变动了多少成长值
     */
    @TableField(value = "updated_growth_value")
    private Long updatedGrowthValue;

    /**
     * 本次变动之后的成长值
     */
    @TableField(value = "new_growth_value")
    private Long newGrowthValue;

    /**
     * 本次变动之前的会员等级
     */
    @TableField(value = "old_member_level")
    private Integer oldMemberLevel;

    /**
     * 本次变动后的会员级别
     */
    @TableField(value = "new_member_level")
    private Integer newMemberLevel;

    /**
     * 变动原因
     */
    @TableField(value = "update_reason")
    private String updateReason;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_USER_ACCOUNT_ID = "user_account_id";

    public static final String COL_OLD_GROWTH_VALUE = "old_growth_value";

    public static final String COL_UPDATED_GROWTH_VALUE = "updated_growth_value";

    public static final String COL_NEW_GROWTH_VALUE = "new_growth_value";

    public static final String COL_OLD_MEMBER_LEVEL = "old_member_level";

    public static final String COL_NEW_MEMBER_LEVEL = "new_member_level";

    public static final String COL_UPDATE_REASON = "update_reason";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}